import request from '@/utils/request'

// 查询电围规则列表
export function listElectricFenceRule(query) {
  return request({
    url: '/ys/electricFenceRule/list',
    method: 'get',
    params: query
  })
}

// 查询电围规则详细
export function getElectricFenceRule(id) {
  return request({
    url: '/ys/electricFenceRule/' + id,
    method: 'get'
  })
}

// 新增电围规则
export function addElectricFenceRule(data) {
  return request({
    url: '/ys/electricFenceRule',
    method: 'post',
    data: data
  })
}

// 修改电围规则
export function updateElectricFenceRule(data) {
  return request({
    url: '/ys/electricFenceRule',
    method: 'put',
    data: data
  })
}

// 删除电围规则
export function delElectricFenceRule(id) {
  return request({
    url: '/ys/electricFenceRule/' + id,
    method: 'delete'
  })
}
